<?php
/**
 * Created by PhpStorm.
 * User: lishu
 * Date: 11/5/2017 AD
 * Time: 17:09
 */
namespace App\Models\Mysql;

//use Illuminate\Database\Eloquent\Model;
use App\Models\Traits\BaseDBMethod;

class pre_forum_post_tableid
{
	use BaseDBMethod;
	//数据库连接配置项，见config/database.php
	const DATABASE_CONF = 'lqyw_mysql';
	//pre_ct_ui 首页轮播图所在表
	const TABLE_NAME = 'pre_forum_post_tableid';

	//数据库连接配置项，见config/database.php
	//如果需要用ORM，需要设置此项
//	protected $connection = self::DATABASE_CONF;
	//表名，如果需要用ORM，需要设置此项
//	protected $table = self::TABLE_NAME;

	public static function insert()
	{
		$r=db()->insert('pre_forum_post_tableid',array('pid'=>0));
		return $r;
	}
	
	public static function delete_by_lesspid($pid)
	{
		return self::getConnObj()->delete(
			"delete from pre_forum_post_tableid where pid<".$pid
		);
	}	


}